home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / mvhelp / vwr_help.frm < prev    next >
Text File  |  1995-05-07  |  7KB  |  223 lines

  1. VERSION 2.00
  2. Begin Form Form1 
  3.    BackColor       =   &H00C0C0C0&
  4.    BorderStyle     =   1  'Fixed Single
  5.    Caption         =   "Context Sensitive Help With Viewer"
  6.    ClientHeight    =   2955
  7.    ClientLeft      =   1605
  8.    ClientTop       =   1575
  9.    ClientWidth     =   5655
  10.    ForeColor       =   &H00C0C0C0&
  11.    Height          =   3360
  12.    Icon            =   VWR_HELP.FRX:0000
  13.    KeyPreview      =   -1  'True
  14.    Left            =   1545
  15.    LinkTopic       =   "Form1"
  16.    MaxButton       =   0   'False
  17.    ScaleHeight     =   2955
  18.    ScaleWidth      =   5655
  19.    Tag             =   "Form"
  20.    Top             =   1230
  21.    Width           =   5775
  22.    Begin PictureBox Panel3D5 
  23.       BackColor       =   &H00C0C0C0&
  24.       Height          =   375
  25.       Left            =   4320
  26.       ScaleHeight     =   345
  27.       ScaleWidth      =   1065
  28.       TabIndex        =   14
  29.       Top             =   720
  30.       Width           =   1095
  31.       Begin CommandButton cmdHelp 
  32.          Caption         =   "&Help"
  33.          Height          =   315
  34.          Left            =   30
  35.          TabIndex        =   15
  36.          Top             =   30
  37.          Width           =   1035
  38.       End
  39.    End
  40.    Begin PictureBox Panel3D4 
  41.       BackColor       =   &H00C0C0C0&
  42.       Height          =   375
  43.       Left            =   4320
  44.       ScaleHeight     =   345
  45.       ScaleWidth      =   1065
  46.       TabIndex        =   12
  47.       Top             =   1200
  48.       Width           =   1095
  49.       Begin CommandButton Command1 
  50.          Caption         =   "&About"
  51.          Height          =   315
  52.          Index           =   1
  53.          Left            =   30
  54.          TabIndex        =   6
  55.          Tag             =   "AboutButton"
  56.          Top             =   30
  57.          Width           =   1035
  58.       End
  59.    End
  60.    Begin PictureBox Panel3D3 
  61.       BackColor       =   &H00C0C0C0&
  62.       Height          =   375
  63.       Left            =   4320
  64.       ScaleHeight     =   345
  65.       ScaleWidth      =   1065
  66.       TabIndex        =   11
  67.       Top             =   240
  68.       Width           =   1095
  69.       Begin CommandButton Command1 
  70.          Cancel          =   -1  'True
  71.          Caption         =   "Close"
  72.          Height          =   315
  73.          Index           =   0
  74.          Left            =   30
  75.          TabIndex        =   5
  76.          Tag             =   "CloseButton"
  77.          Top             =   30
  78.          Width           =   1035
  79.       End
  80.    End
  81.    Begin PictureBox Panel3D2 
  82.       BackColor       =   &H00C0C0C0&
  83.       Height          =   1215
  84.       Left            =   240
  85.       ScaleHeight     =   1185
  86.       ScaleWidth      =   2505
  87.       TabIndex        =   10
  88.       Top             =   600
  89.       Width           =   2535
  90.       Begin DirListBox Dir1 
  91.          BackColor       =   &H00FFFFFF&
  92.          Height          =   1155
  93.          Left            =   30
  94.          TabIndex        =   0
  95.          Tag             =   "FileListBox"
  96.          Top             =   30
  97.          Width           =   2475
  98.       End
  99.    End
  100.    Begin PictureBox Panel3D1 
  101.       BackColor       =   &H00C0C0C0&
  102.       Height          =   375
  103.       Left            =   240
  104.       ScaleHeight     =   345
  105.       ScaleWidth      =   2505
  106.       TabIndex        =   9
  107.       Top             =   2400
  108.       Width           =   2535
  109.       Begin TextBox Text1 
  110.          BackColor       =   &H00FFFFFF&
  111.          Height          =   315
  112.          Left            =   30
  113.          TabIndex        =   1
  114.          Tag             =   "TextBox"
  115.          Text            =   "Topic 2"
  116.          Top             =   30
  117.          Width           =   2475
  118.       End
  119.    End
  120.    Begin PictureBox Frame3D1 
  121.       Height          =   1095
  122.       Left            =   3720
  123.       ScaleHeight     =   1065
  124.       ScaleWidth      =   1665
  125.       TabIndex        =   8
  126.       Top             =   1680
  127.       Width           =   1695
  128.       Begin PictureBox Option3D2 
  129.          Height          =   255
  130.          Left            =   360
  131.          ScaleHeight     =   225
  132.          ScaleWidth      =   1065
  133.          TabIndex        =   4
  134.          Tag             =   "OptionButton2"
  135.          Top             =   720
  136.          Width           =   1095
  137.       End
  138.       Begin PictureBox Option3D1 
  139.          Height          =   255
  140.          Left            =   360
  141.          ScaleHeight     =   225
  142.          ScaleWidth      =   1065
  143.          TabIndex        =   3
  144.          Tag             =   "OptionButton1"
  145.          Top             =   360
  146.          Width           =   1095
  147.       End
  148.    End
  149.    Begin PictureBox Picture1 
  150.       AutoSize        =   -1  'True
  151.       Height          =   510
  152.       Left            =   3000
  153.       Picture         =   VWR_HELP.FRX:0302
  154.       ScaleHeight     =   480
  155.       ScaleWidth      =   480
  156.       TabIndex        =   2
  157.       Tag             =   "PictureBox"
  158.       Top             =   600
  159.       Width           =   510
  160.    End
  161.    Begin Label Label2 
  162.       AutoSize        =   -1  'True
  163.       BackStyle       =   0  'Transparent
  164.       Caption         =   "Give any of these guys the focus, then hit F1:"
  165.       Height          =   195
  166.       Left            =   240
  167.       TabIndex        =   13
  168.       Top             =   240
  169.       Width           =   3915
  170.    End
  171.    Begin Label Label1 
  172.       BackStyle       =   0  'Transparent
  173.       Caption         =   "Text Box:"
  174.       Height          =   255
  175.       Left            =   240
  176.       TabIndex        =   7
  177.       Top             =   2160
  178.       Width           =   2415
  179.    End
  180. End
  181.  
  182. Option Explicit
  183.  
  184. Sub cmdHelp_Click ()
  185.   Dim temp$
  186.   temp$ = Me.Tag
  187.   StartViewer
  188.   JumpTopic temp$
  189. End Sub
  190.  
  191. Sub Command1_Click (index As Integer)
  192.   If index = 0 Then  'close app
  193.     Unload Me
  194.   Else               'about box
  195.     frmAbout.Show 1
  196.   End If
  197. End Sub
  198.  
  199. ' Now we're set to trap the F1 keypress (make sure the form's KeyPreview
  200. ' property is set to true):
  201. Sub Form_KeyDown (KeyCode As Integer, Shift As Integer)
  202.   Dim temp$
  203.   If KeyCode = VK_F1 Then
  204.     temp$ = screen.ActiveControl.Tag
  205.     StartViewer
  206.     JumpTopic temp$
  207.   End If
  208. End Sub
  209.  
  210. Sub Form_Load ()
  211.   Move screen.Height \ 2 - Height \ 2, screen.Width \ 2 - Width \ 2
  212. End Sub
  213.  
  214. ' When your app ends make sure you close Viewer, just as you
  215. ' would with a Help file:
  216. Sub Form_Unload (Cancel As Integer)
  217.   Dim temp
  218. ' close Viewer
  219.   temp = VwrQuit(vwr)
  220.   End
  221. End Sub
  222.  
  223.